|
|
For each field that appears in a form submission, you can set up a collection of rules. |
|
|
|
|
|
Correction rules
These will automatically detect and correct any mistakes. |
|
|
|
|
|
Flag rules
These will show a warning flag next to the field when you process a form submission. |
|
|
|
|
|
Same as rules for... |
|
|
If you have made a set of rules for a particular type of field and you want to apply them to another field, even if it's part of a different Subject identifier, then use the Same as option.
This is the best way to set rules because if you want to adjust the rules for a particular type of field, you only have to do it in one place. |
|
|
|
|
|
Tip You could create a dummy form submission called Library of Rules which just holds sets of rules for different types of fields, and then use the Same as option for all your form submissions. |
|
|
|
|
|
Format as |
|
|
This will change the formatting of your field, if you wish. |
|
|
|
|
|
(no changes)
The formatting of the field value will not be altered. |
|
|
|
|
|
Change to lower case
Whatever the user typed-in will become small letters. |
|
|
|
|
|
Change to upper case
Whatever the user typed-in will become capital letters. This is useful for formatting postal codes. |
|
|
|
|
|
Change to Each Word Capitalised
Whatever the user typed-in will become lower case with each word capitalised. This is useful for formatting people's names. |
|
|
|
|
|
General Rules / Collective Rules |
|
|
You can set rules up in two ways: |
|
|
|
|
|
General rules
Each rule is applied individually, and if any one scores a hit then a flag will be shown. |
|
|
|
|
|
Collective rules
Every single rule must score a hit in order for a flag to be shown. |
|
|
|
|
|
Example: Rules for an E-mail address |
|
|
In a form submission you'll nearly always ask for an e-mail address, and making sure it's valid can be crucial because it may be the only way you have of getting back in touch with the person.
Here is how you might set up the rules to correct common mistakes and also flag potential problems. |
|
|
|
|
|
Formatting
Change to lower case |
|
|
|
|
|
General rules
If does not contain @ then show warning flag
If does not contain . then show warning flag
If contains " then change matching text to @
If contains ' then change matching text to @
If contains , then change matching text to . |
|
|
|
|
|
Collective rules
If does not end with .com ...and...
If does not end with .co.uk
then show a warning flag |
|
|
|
|
|
Let's analyse how these rules will work. |
|
|
|
|
|
General rules
If the e-mail address doesn't contain the @ symbol then it will show a warning flag because there's no way to guess where the @ should go.
If then e-mail address doesn't contain a full stop then it will show a warning flag because any e-mail address will have at least one, chances are the user has missed off the .com or .co.uk off the end.
If the e-mail address contains " or ' then change it to @. This wil happen if the user forgets to hold Shift when typing the @ symbol - on a U.S. keyboard they'll get " and on a U.K. keyboard they'll get '.
If the e-mail address contains a comma then change it to a full stop. Chances are they hit the wrong key by mistake and this correction will work.
In all cases, bear in mind that if the e-mail address contains " or ' or , then it certainly won't be valid. At least changing it to a likely alternative gives it some chance of being correct! |
|
|
|
|
|
Collective rules
If the e-mail address doesn't end with .com and it doesn't end with .co.uk then show a warning flag.
Obviously there are numerous valid e-mail extensions for different countries, this is only for an example. However, in this case you'll get a warning if the e-mail address doesn't end with either .com or .co.uk. |